<?php
class Guid {

    /**
     * @var Mixed A binary representation of the class
     **/
    private $_value;

    /**
     * @param Mixed $stringValue An optional value to create class from
     **/
    public function Guid($stringValue = null) {
        if (null != $stringValue) {
            $this->_value = $stringValue;
        } else {
            // TODO: Better random number generation
            $this->_value = date('m-d-y-h-i-s');
        }
    }

    public function toString() {
        return $this->_value;
    }
}
?>